package com.xk857.school.controller.pub;


import com.xk857.entities.TourismComment;
import com.xk857.school.service.ITourismCommentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 星空小屋-组团旅行评论表 前端控制器
 * </p>
 *
 * @author CV大魔王
 * @since 2021-05-02
 */
@Api(value = "组团评论接口(公共)", tags = "组团评论接口(公共)")
@RestController
@RequestMapping("/pub/tourism/comment")
public class PubTourismCommentController {

    @Autowired
    private ITourismCommentService tourismCommentService;


    @ApiOperation("根据组团id查询所有评论信息")
    @GetMapping("/{tourismId}")
    public List<TourismComment> findByTourismId(@PathVariable String tourismId){
        return tourismCommentService.findByTourismId(tourismId);
    }

}
